<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>PCCA</title>
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<link rel="stylesheet" type="text/css" href="fonts/fonts.css">

	<script type="text/javascript" src="js/Adaptive.js"></script>
	<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
	<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
	
	<script type="text/javascript" src="js/weixin.js"></script>


</head>
<body>

	<div id="shareCon"><img src="images/share.png"></div>
	<section id="MaxCon" class="pageFour">
		<div class="title">Your time</div>
		<div class="time"><span id="timeCon"></span><span class="miao"> s</span></div>

		<div class="centerInfo">
			<div class="head"></div>
			<div class="info"></div>

			<a class="linkMo" href="http://www.carreracupasia.com/archive-news/carrera-cup-asia-insights-strategising-from-the-ground-up/"></a>
			<div class="sign"></div>
		</div>

		<div class="btnCon">
			<a class="act" href="function.html"><i class="iconfont">&#xe61f;</i>Try again</a>
			<a href="javascript:void(0);" id="shareBtn"><i class="iconfont">&#xe61a;</i>Share</a>
		</div>
	</section>



	<script type="text/javascript">

		var porject = {
			defeated : {
				head:'Oops!',
				info: 'Almost there. Try it again!It’s a complicated process! ',
				link: 'For more info, click here. Then try again!',
				sign:'失败',
				bgImage: 'over_4.png'
			},
			succeed : {
				head:'Wow – an instant pro!',
				info: 'Congratulations! You have beaten 90% of competitors <br/> and your driver is ready to go! ',
				link: 'Want to learn more about tyre pressure <br/>before your next go? Click here.',
				sign:'合格工程师',
				bgImage: 'over_1.png'

			},
			succeedTwo : {
				head:'Great job!',
				info: 'You have beaten 60% of competitors! Let’s hit the track.',
				link:'Want to learn more about tyre pressure <br/>before your next go? Click here.',
				sign:'进阶工程师',
				bgImage: 'over_2.png'

			},
			succeedThrre : {
				head:'Great job!',
				info: 'Nice work! You got your driver ready <br/>for some fierce competition! ',
				link: 'Get some insider insight on tyre pressure here. <br/>Then try again!',
				sign:'菜鸟工程师',
				bgImage: 'over_3.png'

			},

			overtime: {
				head:'Oops!',
				info: 'Almost there. Try it again!It’s a complicated process! ',
				link: 'For more info, click here. Then try again!',
				sign:'失败',
				bgImage: 'over_4.png'

			},
		}
		
		function GetQueryString(name){
			var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
			var r = window.location.search.substr(1).match(reg);
			if(r!=null)return  unescape(r[2]); return null;
		}


		function AddTextFun(srting) {
			$('#timeCon').text(GetQueryString('time'))

			$('.centerInfo').find('.head').html(porject[srting].head);
			$('.centerInfo').find('.info').html(porject[srting].info);

			$('.centerInfo').find('.sign').css({backgroundImage:'url(images/'+porject[srting].bgImage+')'});

			$('.centerInfo').find('a.linkMo').html(porject[srting].link);



			// if (GetQueryString('linkFo')  == 'secss') {
			// 	$('a.linkMo').show();
			// }else{
			// 	$('a.linkMo').hide();
			// }
		}
		AddTextFun(GetQueryString('result'));




		$('a#shareBtn').click(function(event) {
			$('div#shareCon').show();
		});
		$('div#shareCon').click(function(event) {
			$(this).hide();
		});

		// console.log(GetQueryString('result'))
		// console.log(GetQueryString('time'))
		// console.log(GetQueryString('minute'))
		// console.log(GetQueryString('second'))
		// console.log(GetQueryString('millisecond'))


	</script>


	

	
</body>
</html>